{extend name='base'}
{block name='content'}
<div id="masthead">
    <div id="masthead-v4" class="w952 fd-clr">
        <div class="ali-logo-v4">
            <a title="阿里巴巴" href="" class="main-logo-v4">
                <img width="108" height="38" alt="阿里巴巴" src="//cbu01.alicdn.com/cms/upload/2015/131/133/2331131_1367035968.png" /></a>
        </div>
    </div>
</div>
<div id="content">
    <div class="layer layer-main">
        <div class="layout screen">
        </div>
        <div class="screen">
            <div id="address" class="layout" >
                <div class="module mod-layout mod-address">
                    <!--地址选择开始-->
                    <div class="content-address">
                        {foreach name="addressData" item="v"}
                        <div class="consignee-item">
                            <span class="radio-img pitchOn"></span>
                            <label for="adress1" class="radio">
                                <input type="radio" name="adress" id="adress1" class="radio-select" value="{$v['raid']}"/>
                                <span class="e-name">{$v['raname']}</span>，
                                <span class="city">{$v['address']} </span>
                                <span class="city-particular">{$v['particular']}</span>，
                                <span class="codeNumber">{$v['phone']}</span>
                                <span class="postcodes">{$v['postcodes']}</span>
                            </label>
                            <span class="compile">
                                <a class="copyreader" href="javascript:;">编辑</a>
                            </span>
                        </div>
                        {/foreach}
                        <script>
                            $(function(){
                                //获取id
                                $('.copyreader').delegate('','click',function(){
                                   var raid= $(this).parent('.compile').siblings('.radio').find('.radio-select').val();
                                    $('.edit .btn-group .raid').val(raid);
                                })
                            })
                        </script>
                        <!--添加新地址-->
                        <div class="consignee-item new-ress">
                            <span class="radio-img"></span>
                            <label for="adress3" class="radio">
                                <input type="radio" name="adress" id="adress3" class="radio-select"  value=""/>使用新地址</label>
                        </div>
                        <!--添加地址框-->
                        <div class="add-address new">
                            <form action="{:url('index/order/address')}" method="post">
                                <div class="s-name">
                                    <h3 class="style"><b>*</b>收货人姓名</h3>
                                    <input type="text" class="public" name="raname" id="name" placeholder="收货人姓名" value="" />
                                </div>
                                <div class="address-s">
                                    <h3 class="style"><b>*</b>地址</h3>

                                    <!--城市联动-->
                                    <select name="address[]" id="area1"></select>
                                    <select name="address[]" id="area2"></select>
                                    <select name="address[]" id="area3"></select>
                                    <script type="text/javascript">
                                        $(function () {
                                            //初始化方法
                                            area.init('area');
                                            //修改的时候默认被选中效果
                                            area.selected('浙江', '温州', '苍南县');
                                        })
                                    </script>
                                    <textarea name="particular" placeholder="路名或街道地址，门牌号 " id="particular" rows="" cols=""></textarea>
                                </div>

                                <div class="postcode">
                                    <h3 class="style"><b>&nbsp;</b>邮政编码</h3>
                                    <input type="text" class="public" name="postcodes" id="postcode" placeholder="6位邮政编码" value="" />
                                </div>
                                <div class="shouji">
                                    <h3 class="style"><b>*</b>手机号码 </h3>
                                    <input type="text" class="public" name="phone" id="shouji" placeholder="11位手机号码" value="" />
                                </div>
                                <div class="btn-group">
                                    <input type="submit"  class="btn" id="btn-bao" value="保存"/>
                                    <a href="javascript:;" class="btn-qu btn">取消</a>
                                </div>

                            </form>
                        </div>
                        <!--添加地址按钮-->
                        <a href="javascript:;" class="new-address"></a>
                        <!--添加新地址结束-->
                        <!--编辑开始-->
                        <div class="add-address edit">
                            <form action="{:url('index/order/address')}" method="post">
                                <div class="name">
                                    <h3 class="style"><b>*</b>收货人姓名</h3>
                                    <input type="text" class="public" name="raname" id="names" placeholder="收货人姓名" value="" />
                                </div>
                                <div class="address-s">
                                    <h3 class="style"><b>*</b>地址</h3>

                                    <!--城市联动-->
                                    <select name="address[]" id="areas1"></select>
                                    <select name="address[]" id="areas2"></select>
                                    <select name="address[]" id="areas3"></select>
                                    <script type="text/javascript">
                                        $(function () {
                                            //初始化方法
                                            area.init('areas');
                                            //修改的时候默认被选中效果
                                            area.selected('浙江', '温州', '苍南县');
                                        })
                                    </script>
                                    <!--<input type="text" name="name" id="name" placeholder="收货人姓名" value="" />-->
                                    <textarea name="particular" placeholder="路名或街道地址，门牌号 " id="particular" rows="" cols=""></textarea>
                                </div>

                                <div class="postcode">
                                    <h3 class="style"><b>&nbsp;</b>邮政编码</h3>
                                    <input type="text" class="public" name="postcodes" id="postcode" placeholder="6位邮政编码" value="" />
                                </div>
                                <div class="phone">
                                    <h3 class="style"><b>*</b>手机号码 </h3>
                                    <input type="text" class="public" name="phone" id="phone" placeholder="11位手机号码" value="" />
                                </div>
                                <div class="btn-group">
                                    <input type="hidden" name="raid" value="" placeholder="" class="raid"/>
                                    <input type="submit"  class="btn" id="btn-bao" value="保存"/>
                                    <a href="javascript:;" class="btn-qu btn">取消</a>
                                </div>

                            </form>
                        </div>
                    </div>
                    <!--地址选择结束-->
                </div>
            </div>
        </div>
        <div class="district screen">
            <div id="order" class="layout">


                {foreach name="newCart['goods']" item='v' key='k'}
                <div class="group-order">
                    <div class="store">
                        <!--<div class="contact">卖家：-->
                            <!--<a class="store-name" href="" >广州市峰汇广告礼品有限公司</a>-->
                            <a class="store-alitalk" href="#">{$k}</a>
                        <!--</div>-->
                    </div>
                    <div class="module mod-sublevel mod-order">
                        <div class="content">
                            <div class="container">
                                <div class="make-order-floor unit-order-floor fd-hide"></div>
                                <div class="zone-order">
                                    <div class="thead">
                                        <ul class="list">
                                            <li class="col-goods">货品信息</li>
                                            <li class="col-unit-price">单价（元）</li>
                                            <li class="col-quantity">数量</li>
                                            <li class="col-promo">优惠（元）</li>
                                            <li class="col-amount">金额（元）</li>
                                            <li class="col-freight">运费（元）</li>
                                        </ul>
                                    </div>
                                    <div class="offers" kk="{$k}">
                                        <input type="hidden" name="id" value="{$v['id']}">
                                        <table cellspacing="0" cellpadding="0">
                                            <colgroup>
                                                <col class="col-goods" />
                                                <col class="col-unit-price" />
                                                <col class="col-quantity" />
                                                <col class="col-promo" />
                                                <col class="col-amount" />
                                                <col class="col-freight" />
                                            </colgroup>
                                            <tbody>
                                            <tr class="single last">
                                                <td>
                                                    <dl class="cell-thumbnail">
                                                        <dt class="side">
                                                            <a class="a-img" href="" target="_blank" >
                                                                <img src="{$v['pic']}" />
                                                            </a>
                                                        </dt>
                                                        <dd class="offer-title">
                                                            <a href="" target="_blank">{$v['name']}</a>
                                                        </dd>
                                                        <dd class="offer-sku">
                                                            <span class="sku-item ">{$v['options']}</span>
                                                        </dd>
                                                        <dd class="support-icon">
                                                            <div class="icon-list">
                                                            </div>
                                                        </dd>
                                                    </dl> </td>
                                                <td>
                                                    <div class="unit-price" >{$v['price']}</div>
                                                </td>
                                                <td>
                                                    <div class="quantity quantity-text">{$v['num']}</div>
                                                </td>
                                                <td>
                                                    <div class="rebate">--</div>
                                                </td>
                                                <td>
                                                    <div class="amount">{$v['total']}</div>
                                                </td>
                                                <td class="freight-wrap">
                                                    <div class="freight">
                                                        <span class="fee">15.00</span>
                                                    </div>
                                                    <div class="freight-detail">
                                                        <span class="view">查看详情</span>
                                                        <div class="view-detail">
                                                            <dl>
                                                                <dt>货品总量：</dt>
                                                                <dd><em>2</em> 公斤</dd>
                                                            </dl>
                                                            <dl>
                                                                <dt>运费费率：</dt>
                                                                <dd class="freight-content">
                                                                    首费1.00公斤12.00元; 每增加1.00公斤,增加运费3.00元。
                                                                </dd>
                                                            </dl>
                                                            <dl>
                                                                <dt>模板备注：</dt>
                                                                <dd>
                                                                </dd>
                                                            </dl>
                                                        </div>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr class="order-insurance last  fd-hide ">
                                                <td colspan="6">
                                                    <div class="insurance-name">保险服务</div>
                                                </td>
                                            </tr>
                                            <tr class="step-price fd-hide" data-trade-val="multiStep_42">
                                                <td class="td-extra" colspan="6">
                                                    <div class="step-list-header">
                                                        <div class="list-top-arrow"></div>
                                                    </div>
                                                    <ul class="unit-order-step">
                                                        <li class="step-item step-item-first">
                                                            <div class="row">
                                                                <div class="cell c1 step-name">
                                                                    阶段1：全款交易（100.0%）
                                                                </div>
                                                                <div class="cell c2 step-price"></div>
                                                                <div class="cell c3 step-amount"></div>
                                                                <div class="cell c4 step-prom"></div>
                                                                <div class="cell c5 step-total"></div>
                                                                <div class="cell c6 step-fare"></div>
                                                            </div>
                                                        </li>
                                                    </ul>
                                                </td>
                                            </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                    <script>
                                        $(function(){
                                            $('#tijiao').click(function () {
                                                //1.获取购买数量
                                                var  pquantity = $('.quantity').text();
                                                //获取订单号
                                                var kk = $('.offers').attr('kk');
                                                //获取价格小计
                                                var sprice = $('.amount').text();
                                                //获取规格
                                                var gid = $("input:hidden[name='id']").val();
                                                //获取留言信息
                                                var remark = $(".textarea-trigger").val();
                                                $.ajax({
                                                    type:'post',
                                                    url:"{:url('index/order/add')}",
                                                    data:{gid:gid,pquantity:pquantity,sprice:sprice,remark:remark,kk:kk},
                                                    dataType:'json',
                                                    success:function (res) {
                                                        location.href = "{:url('index/order/orders')}"
                                                    }
                                                })

                                            })
                                        })
                                    </script>
                                    <table class="summary" cellspacing="0" cellpadding="0">
                                        <tbody>
                                        <tr>
                                            <td>
                                                <div class="appendix ">
                                                    <dl class="message">
                                                        <dt class="label">给卖家留言：</dt>
                                                        <dd>
                                                            <input  class="textarea-trigger" value="" placeholder="可以告诉卖家您的特殊要求">
                                                            <!--<div class="textarea-trigger">-->
                                                                <!--可以告诉卖家您的特殊要求-->
                                                            <!--</div>-->
                                                        </dd>
                                                    </dl>
                                                </div>
                                            </td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                {/foreach}
            </div>
        </div>
        <div class="screen">
            <div class="mod mod-summary mod-sublevel">
                <div class="header">
                    <div class="cell-header">
                        <h2 class="title">总计：</h2>
                    </div>
                </div>
                <div class="content">
                    <div class="container">
                        <div class="summary-count">
                            <dl>
                                <dt>货品种类：</dt>
                                <dd>
                                    <span class="kinds-total"></span>种
                                </dd>
                                <dt>数量总计：</dt>
                                <dd>
                                    <span class="quantity-total">{$newCart['total_rows']}</span>件
                                </dd>
                            </dl>
                        </div>
                        <div class="summary-info">
                            <div class="summary-tips fd-hide">
                                <p class="icon-warning platform-coupon-tip fd-hide">每次下单仅有一笔订单可用进货券，若要多笔订单使用可分别下单</p>
                                <div class="items fd-clr">
                                    <div class="item item-platform-rebate-total fd-hide">
                                        <div class="fd-clr">
                                            <span class="label">平台优惠（进货券或补货券）：</span>
                                            <span class="control"><em class="cash"></em>元</span>
                                        </div>
                                        <div class="text-lesser text-small fd-clr ">
                                            （注：同店铺下交易方式不同的订单无法叠加使用平台优惠）
                                        </div>
                                    </div>
                                    <!-- 极速到账,start  -->
                                    <div class="item item-instant-credit fd-hide">
                                        <span class="unit-strip-label">
                                            <span class="main">卖家已开通极速到账，您的付款将直接打入卖家支付宝，并由卖家保证金或保险公司提供退款保障</span>
                                        </span>
                                    </div>
                                    <!-- 极速到账,end  -->
                                    <!-- 零售通起批限制,start -->
                                    <div class="item item-retail-limit fd-hide">
                                        <span class="label">阿里巴巴发货的订单满288元起订并包邮</span>
                                    </div>
                                    <!-- 零售通起批限制,end -->
                                    <!-- 货到付款  tip start-->
                                    <div class="item item-cod-tip fd-hide">
                                        <div class="unit-striptip cod-striptip">
                                            <div class="main">
                                                由于
                                                <strong>地址</strong>或者
                                                <strong>订单金额</strong>不符合货到付款要求请更换付款方式或修改订单信息&nbsp;&nbsp;
                                                <a href="http://114.1688.com/kf/detail/33333902.html" target="_blank">了解更多</a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="summary-cash">
                                <div class="summary-container">
                                    <div class="items fd-clr">
                                        <div class="items-sub-total">
                                            <div class="item item-rebate-total">
                                                <span class="label">店铺优惠共计：</span>
                                                <span class="control"><em class="rebate-total"></em>元</span>
                                            </div>
                                            <div class="item item-rebatemoney-total fd-hide">
                                                <span class="label">店铺返利金共计：</span>
                                                <span class="control"><em class="rebatemoney-total"></em>元</span>
                                            </div>
                                            <div class="item item-freight-total">
                                                <span class="label">运费共计：</span>
                                                <span class="control"><em class="freight-total"></em>元</span>
                                            </div>
                                            <div class="item item-goods-total">
                                                <span class="label">货品总金额：</span>
                                                <span class="control"><em class="goods-total"></em>元</span>
                                            </div>
                                            <div class="item item-fee-total">
                                                <span class="label">服务费共计：</span>
                                                <span class="control"><em class="fee-total"></em>元</span>
                                            </div>
                                            <!--代收付款抹零 substituteFee start-->
                                            <div class="item item-substitute-total fd-hide">
                                                <span class="label">代收付款抹零：</span>
                                                <span class="control"><em class="subfee-total"></em>元</span>
                                            </div>
                                            <!--代收付款抹零 substituteFee end-->
                                            <!--阶梯团 deposit start-->
                                            <div class="item item-deposit-total fd-hide">
                                                <span class="label">定金共计：</span>
                                                <span class="control"><em class="deposit-total"></em>元</span>
                                            </div>
                                            <!--阶梯团 deposit end-->
                                            <!--订单金额 start -->
                                            <div class="item item-order-total fd-hide">
                                                <span class="label">订单总金额：</span>
                                                <span class="control"><em class="order-total"></em>元</span>
                                            </div>
                                        </div>
                                        <!--订单金额 end -->
                                        <div class="item item-due-total">
                                            <span class="label">应付总额（<span class="due-total-note">含运费</span>）：</span>
                                            <span class="control"><em class="due-total text-stress"></em>{$newCart['total_price']}元</span>
                                        </div>
                                        <!-- 保障服务浮层  tip end-->
                                        <div class="item item-guarantee-list fd-hide " id="item-guarantee-list">
                                            <div class="mod-guarantee-list ">
                                                <dl class="guarantee fd-clr " data-val="isguarantee">
                                                    <dt class="">
                                                        <span class="icon"><img src="" alt="买家保障" /></span>
                                                        <span class="name">买家保障</span>
                                                        <span class="state">全部支持</span>
                                                    </dt>
                                                    <dd class="desc">
                                                        该卖家支持先行赔付，保障买家交易安全
                                                    </dd>
                                                </dl>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div id="make-checkout" class="layout screen">
            <div class="mod-identifying-code">
            </div>
            <div class="mod mod-checkout">
                <div class="actions fd-clr">
                    <a class="to-newCart" href="" title="返回进货单" data-tracelog="ddxx_backjhd" data-needfocus="ddxx_backjhd_j" style="padding-top: 10px;">返回进货单</a>
                    <div class="checkout-operate">
                        <div class="checkout-due-total">
                            <span class="label">应付总额（<span class="due-total-note">含运费</span>）：</span>
                            <span class="control"><em class="due-total text-stress"></em><em class="text-stress">{$newCart['total_price']}元</em></span>
                        </div>
                        <div class="checkout-trade-mode-contract" style="display:none">
                            <div class="trade-mode-checkbox fd-hide">
                                <div class="trade-mode-label">
                                    <span class="lang-checkbox" name="agree-trade-contract">
                                        <input type="checkbox" id="trade-mode-checkbox" autocomplete="off" />
                                        <label for="trade-mode-checkbox"></label>
                                    </span>
                                    <label for="trade-mode-checkbox">我已确认并同意以上交易合约</label>
                                </div>
                                <div class="error-tip icon-error-small fd-hide text-error">
                                    请勾选确认交易合约
                                </div>
                            </div>
                        </div>
                        <a class="button lang-button button-important button-large make-order" id="tijiao" href="javascript:;">提交订单</a>
                        <!--{:url('index/order/orders')}-->

                    </div>
                </div>
            </div>
        </div>

    </div>
</div>
<div id="footer">
    <div id="footer-v0">
        <div class="footer-container">
            <div class="ali-pages">
                <p id="copyright">&copy; 2010-2017 1688.com 版权所有</p>
                <ul>
                    <li><a rel="nofollow" href="" target="_self" title="著作权与商标声明">著作权与商标声明</a> |</li>
                    <li><a rel="nofollow" href="" target="_self" title="法律声明">法律声明</a> |</li>
                    <li><a rel="nofollow" href="" target="_self" title="服务条款">服务条款</a> |</li>
                    <li><a rel="nofollow" href="" target="_self" title="隐私政策">隐私政策</a> |</li>
                    <li><a rel="nofollow" href="l" target="_self" title="关于阿里巴巴">关于阿里巴巴</a> |</li>
                    <li><a rel="nofollow" href="" target="_self" title="联系我们">联系我们</a> |</li>
                    <li><a href="" target="_self" title="网站导航">网站导航</a></li>
                </ul>
            </div>
            <div class="ali-group">
                <dl>
                    <dd>
                        <a rel="nofollow" href="" title="阿里巴巴集团">阿里巴巴集团</a> |
                    </dd>
                    <dd>
                        <a rel="nofollow" href="" title="阿里巴巴国际站">阿里巴巴国际站</a> |
                    </dd>
                    <dd>
                        <a rel="nofollow" href="" title="阿里巴巴中国站">阿里巴巴中国站</a> |
                    </dd>
                    <dd>
                        <a rel="nofollow" href="" title="全球速卖通">全球速卖通</a> |
                    </dd>
                    <dd>
                        <a rel="nofollow" href="" title="淘宝网">淘宝网</a> |
                    </dd>
                    <dd>
                        <a rel="nofollow" href="" title="天猫">天猫</a> |
                    </dd>
                    <dd>
                        <a rel="nofollow" href="" title="聚划算">聚划算</a> |
                    </dd>
                    <dd>
                        <a rel="nofollow" href="" title="一淘">一淘</a> |
                    </dd>
                    <dd>
                        <a href="" title="阿里旅行 &middot; 去啊">阿里旅行 &middot; 去啊</a> |
                    </dd>
                    <dd>
                        <a rel="nofollow" href="" title="阿里妈妈">阿里妈妈</a> |
                    </dd>
                    <dd>
                        <a rel="nofollow" href="" title="虾米">虾米</a> |
                    </dd>
                    <dd>
                        <a rel="nofollow" href="" title="阿里云计算">阿里云计算</a> |
                    </dd>
                    <dd>
                        <a rel="nofollow" href="" title="YunOS">YunOS</a> |
                    </dd>
                    <dd>
                        <a rel="nofollow" href="" title="阿里通信">阿里通信</a> |
                    </dd>
                    <dd>
                        <a rel="nofollow" href="" title="万网">万网</a> |
                    </dd>
                    <dd>
                        <a rel="nofollow" href="" title="UC">UC</a> |
                    </dd>
                    <dd>
                        <a rel="nofollow" href="" title="支付宝">支付宝</a> |
                    </dd>
                    <dd>
                        <a rel="nofollow" href="" title="来往">来往</a> |
                    </dd>
                    <dd>
                        <a rel="nofollow" href="" title="钉钉">钉钉</a> |
                    </dd>
                    <dd>
                        <a rel="nofollow" href="" title="阿里健康">阿里健康</a> |
                    </dd>
                    <dd>
                        <a href="" title="一达通">一达通</a> |
                    </dd>
                    <dd>
                        <a href="">Lazada</a>
                    </dd>
                </dl>
            </div>
        </div>
    </div>
</div>

{/block}